//
//  OrderDetailTableViewCell.h
//  B2C
//
//  Created by 李小龙 on 2017/8/2.
//  Copyright © 2017年 lixiaolong. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "OrderModel.h"
#import "OrderHalfButton.h"

typedef NS_ENUM(NSUInteger, DetailCellClickType) {
    DetailCellClickTypeNone,
    DetailCellClickTypeRefund,        // 退款
    DetailCellClickTypeReport,        // 举报
    DetailCellClickTypeCopy,          // 复制单号
    DetailCellClickTypeService,       // 客服
    DetailCellClickTypeRefundCancel,  // 取消退款
    DetailCellClickTypeRefundAgain,   // 重新申请
    DetailCellClickTypeRefundDone,    // 申请通过
    DetailCellClickTypeStoreRefundReject,   // 店铺退款 拒绝退款
    DetailCellClickTypeStoreRefundAgree,    // 店铺退款 同意申请
    DetailCellClickTypeStoreChangePrice,    // 店铺修改价格
    DetailCellClickTypeStoreCheckEvaluate,  // 店铺查看评价
    DetailCellClickTypeStoreClose,          // 店铺关闭订单
    DetailCellClickTypeStoreSendOut,        // 店铺去发货
    DetailCellClickTypeStoreCheck,          // 店铺查看物流
    DetailCellClickTypeStoreDelete,         // 店铺删除订单
};

typedef NS_ENUM(NSUInteger, OrderType) {
    OrderTypeNone,              // 没有类型
    OrderTypeFromSelf,          // 我的订单
    OrderTypeFromMineStore,     // 我的店铺
    OrderTypeRefund,            // 退款中
    OrderTypeRefundDismiss,     // 退款驳回
    OrderTypeRefundSuccess,     // 退款成功
    OrderTypeRefundFailure,     // 卖家同意
    OrderTypeMineStoreRefund,            // 我的店铺退款中
    OrderTypeMineStoreRefundDismiss,     // 我的店铺退款驳回
    OrderTypeMineStoreRefundSuccess,     // 我的店铺退款成功
    OrderTypeMineStoreRefundFailure,     // 我的店铺 卖家同意
};

typedef void(^OrderDetailBlock)(DetailCellClickType type);

@interface OrderDetailTableViewCell : UITableViewCell

@property (weak, nonatomic) IBOutlet UILabel *firstLeftLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstRightLabel;
@property (weak, nonatomic) IBOutlet UIView *firstLineView;

@property (weak, nonatomic) IBOutlet UILabel *secondNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *secondPhoneLabel;
@property (weak, nonatomic) IBOutlet UILabel *secondAddressLabel;

@property (weak, nonatomic) IBOutlet UIImageView *thirdImageView;
@property (weak, nonatomic) IBOutlet UILabel *thirdNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *thirdSpecsLabel;
@property (weak, nonatomic) IBOutlet UILabel *thirdCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *thirdPriceLabel;
@property (weak, nonatomic) IBOutlet UIView *thirdLineView;
@property (strong, nonatomic) OrderHalfButton *thirdOrderButton;

@property (weak, nonatomic) IBOutlet UIButton *fourthReportButton;
@property (weak, nonatomic) IBOutlet UIButton *fourthRefundButton;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fourthRefundButtonWLayout;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *fourthRefundButtonRLayout;
@property (weak, nonatomic) IBOutlet UIView *fourthLineView;

@property (weak, nonatomic) IBOutlet UILabel *fifthContentLabel;
@property (weak, nonatomic) IBOutlet UILabel *fifthPriceLabel;

@property (weak, nonatomic) IBOutlet UILabel *sixthOrderNumberLabel;

@property (weak, nonatomic) IBOutlet UILabel *seventhReasonLabel;
@property (weak, nonatomic) IBOutlet UILabel *seventhPriceLabel;
@property (weak, nonatomic) IBOutlet UILabel *seventhDateLabel;

@property (weak, nonatomic) IBOutlet UIImageView *eighthIconImageView;
@property (weak, nonatomic) IBOutlet UILabel *eighthTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *eightPriceLabel;

@property (weak, nonatomic) IBOutlet UIImageView *ninthIconImageView;
@property (weak, nonatomic) IBOutlet UILabel *ninthTitleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *ninthTypeImageView;

@property (weak, nonatomic) IBOutlet UIView *tenthBackView;
@property (weak, nonatomic) IBOutlet UIButton *tenthServiceButton;

@property (weak, nonatomic) IBOutlet UILabel *eleventhTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *eleventhContentLabel;

@property (weak, nonatomic) IBOutlet SZTextView *twelfthContentTextView;
@property (weak, nonatomic) IBOutlet UIView *twelfthLineView;

@property (nonatomic, copy) OrderDetailBlock detailBlock;

#pragma mark - 订单详情
+ (instancetype)orderDetailCellWith:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath count:(NSInteger)count type:(OrderType)type;
- (void)updateCellWith:(OrderModel *)model indexPath:(NSIndexPath *)indexPath type:(OrderType)type;
#pragma mark - 退款订单详情
+ (instancetype)refundDetailCellWith:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath count:(NSInteger)count type:(OrderType)type;
- (void)updateRefundDetailCellWith:(OrderModel *)model indexPath:(NSIndexPath *)indexPath count:(NSInteger)count type:(OrderType)type;
#pragma mark - 退款原因申请
+ (instancetype)refundCellWith:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath count:(NSInteger)count;
- (void)updateRefundCellWith:(OrderModel *)model indexPath:(NSIndexPath *)indexPath count:(NSInteger)count;
#pragma mark - 举报商品
+ (instancetype)reportCellWith:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath count:(NSInteger)count;
- (void)updateReportCellWith:(OrderModel *)model indexPath:(NSIndexPath *)indexPath count:(NSInteger)count;
@end
